namespace HZY.Api.Admin.Controllers;

/// <summary>
/// 后台系统基础控制器
/// </summary>
[Route(AdminControllerBase.RouteTemplate)]
[Authorize] //是否授权 Authorize
public abstract class AdminControllerBase(IServiceProvider serviceProvider) : ApplicationControllerBase(serviceProvider)
{
    public const string RouteTemplate = "api/v1/admin/[controller]/[action]";
}

/// <summary>
/// 后台系统基础控制器
/// </summary>
/// <typeparam name="TService"></typeparam>
[Route(AdminControllerBase.RouteTemplate)]
[Authorize] //是否授权 Authorize
public abstract class AdminControllerBase<TService>(IServiceProvider serviceProvider)
    : ApplicationControllerBase<TService>(serviceProvider)
    where TService : class
{
}

/// <summary>
/// 后台系统基础控制器
/// </summary>
/// <typeparam name="TService"></typeparam>
/// <typeparam name="TEntity"></typeparam>
/// <typeparam name="TKey"></typeparam>
/// <typeparam name="TSearchDto"></typeparam>
/// <typeparam name="TSaveFormDto"></typeparam>
[Route(AdminControllerBase.RouteTemplate)]
[Authorize] //是否授权 Authorize
public abstract class AdminControllerBase<TService, TEntity, TKey, TSearchDto, TSaveFormDto>(
    IServiceProvider serviceProvider) :
    ApplicationControllerBase<TService, TEntity, TKey, TSearchDto, TSaveFormDto>(serviceProvider)
    where TService : ApplicationService<TEntity, TKey, TSearchDto, TSaveFormDto>
    where TEntity : class, new()
    where TSearchDto : class, new()
    where TSaveFormDto : class, new()
{
}